package com.laiketui.order.api.feign;

import com.laiketui.order.api.dto.OrderParentDTO;
import com.laiketui.order.api.params.OrderInfoParams;
import com.laiketui.order.api.params.UserPlaceOrderParams;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient("order")
public interface OrderParentFeign {

    @RequestMapping("/orderParent/v2/submitOrder")
    OrderParentDTO submitOrder(@RequestBody @Validated UserPlaceOrderParams userPlaceOrderParams);

    @PostMapping("/orderParent/v2/orderCancel")
    Boolean orderCancel(@RequestBody @Validated OrderInfoParams orderCancelParams);
}
